#ifndef RECURSIVEMUTEX_H
#define RECURSIVEMUTEX_H

#include "compat.hpp"
#include "lockable.hpp"
namespace vpm 
{
	namespace utils
	{

		class Condition;

		class RecursiveMutex : public Lockable
		{
		public:
			RecursiveMutex();
			virtual ~RecursiveMutex();
			virtual void lock();
			virtual void unlock();

		private:

#ifdef WIN32   
			CRITICAL_SECTION mId;
#else
			pthread_mutexattr_t mMutexAttr;
			mutable  pthread_mutex_t mId;
			pthread_mutex_t* getId() const;
#endif
		};

	}
}
#endif // 
  
